#ifndef UART_2_H
#define UART_2_H

//#include "common.h"
#include "stm32f10x.h"

extern void Uart2_initModule(void);
extern uint32_t Uart2_writeByte(uint8_t data);
extern uint32_t Uart2_writeBytes(uint8_t *data, uint32_t n_bytes);
extern uint32_t Uart2_writeString(uint8_t *data_string);
extern void USART2_IRQHandler(void);
extern volatile uint32_t Uart2_postRxRingbufferData(uint8_t* data, uint32_t length);
extern volatile uint32_t Uart2_getRxRingbufferData(uint8_t* data, uint32_t length);
extern volatile uint32_t Uart2_clearRxRingbufferData(void);
extern volatile uint32_t Uart2_getRxRingbufferN2RLength(void);
extern volatile uint32_t Uart2_postAuxRxRingbufferData(uint8_t* data, uint32_t length);
extern volatile uint32_t Uart2_getAuxRxRingbufferData(uint8_t* data, uint32_t length);
extern volatile uint32_t Uart2_clearAuxRxRingbufferData(void);
extern volatile uint32_t Uart2_getAuxRxRingbufferN2RLength(void);
extern void Uart2_enableAUXBuffer(uint8_t val);

#endif